@use '/styles/variables' as *;

.modal {
  max-width: 500px;
  min-height: 350px;
  max-height: calc(100% - 30px);
  height: fit-content;
  display: flex;
  flex-direction: column;
  background-color: $color-white;
  border-radius: 8px;
  padding: 10px 0;
  margin: auto;
  z-index: 2;
  position: fixed;
  inset: 15px;

  &__header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    padding: 0 32px;
    flex-shrink: 0;
  }

  &__heading {
    font-size: 2.2rem;
    text-align: center;
    color: $color-black;
    line-height: 2.5rem;
  }

  &__content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    overflow-y: auto;
  }

  &__backdrop {
    background-color: rgba($color-black, 0.5);
    z-index: 1;
    position: fixed;
    inset: 0;
  }

  &__close-modal-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: $color-white;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px;
    border-width: 0;

    &:hover {
      background-color: $color-gray-bright;
    }

    @media (prefers-reduced-motion: reduce) {
      & {
        transition: none;
      }
    }
  }

}